# $Id: PKGBUILD 183372 2013-04-21 22:09:40Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=gnome-clocks
pkgver=3.8.1
pkgrel=1
pkgdesc="Clocks applications for GNOME"
arch=(i686 x86_64)
url="https://www.gnome.org/"
license=(GPL)
depends=(gtk3 libcanberra libgweather gnome-desktop libnotify
         hicolor-icon-theme gnome-themes-standard)
makedepends=(intltool vala gobject-introspection)
options=(!libtool)
groups=(gnome-extra)
install=gnome-clocks.install
source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver::3}/${pkgname}-${pkgver}.tar.xz
        gnome-clocks.css::http://git.gnome.org/browse/gnome-clocks/plain/data/css/gnome-clocks.css?id=${pkgver}
        button-border-go.svg::http://git.gnome.org/browse/gnome-clocks/plain/data/css/button-border-go.svg?id=${pkgver}
        button-border-go-active.svg::http://git.gnome.org/browse/gnome-clocks/plain/data/css/button-border-go-active.svg?id=${pkgver}
        button-border-stop.svg::http://git.gnome.org/browse/gnome-clocks/plain/data/css/button-border-stop.svg?id=${pkgver}
        button-border-stop-active.svg::http://git.gnome.org/browse/gnome-clocks/plain/data/css/button-border-stop-active.svg?id=${pkgver})
sha256sums=('6140cc1ae41460c5fc799b2a52d809ed4cf9035a72be7e878160b5e591486d31'
            '3ce4afb848ea2a2728c53a9f4bfca5f12d9719e3935d1acd2d90056cb1c464fc'
            'a44df652c8034ccbbc87a62f92ab6efbf6dfabead44e3316b4b9e85d851a6b24'
            'e12ac57acaa43b25a36d9fd9b6dbe906980a5e8429840d98c604bf28515749e0'
            'e71fa928cf5812fb1cc4ea62e55176be14716b670c37c7899368b0f8f020876c'
            '34916c190c259788bcb561f0b4cce73b47a39e50326e1a53a2a91c2725e9d8a3')

build() {
  cd $pkgname-$pkgver

  # Fix files missing from tarball
  mkdir data/css
  cp ../*.{css,svg} data/css

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  make
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
